using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.VisualStudio.Modeling;

namespace EastBancTech.InstallerDefinition
{
    public partial class ComponentPackageBase
    {
        internal string GetPathValue()
        {
            if (this.ParentPackage == null)
                return this.Name;

            return System.IO.Path.Combine(this.ParentPackage.Path, this.Name);
        }
    }

    public partial class ComponentPackage
    {
        public override InstallerPackageModel InstallerModel
        {
            get
            {
                InstallerPackageModel m = base.InstallerModel;
                if(m != null)
                    return m;

                return this.ParentPackage.InstallerModel;
            }
            set
            {
                base.InstallerModel = value;
            }
        }
    }

    public partial class Component
    {
        internal string GetPathValue()
        {
            if (this.ComponentPackage == null)
                return this.Name;

            return System.IO.Path.Combine(this.ComponentPackage.Path, this.Name);
        }
    }
}
